'
该场景用于全局总音乐的控制
'

extends AudioStreamPlayer


func _ready() -> void:
	self.finished.connect(on_finishen)
	$Timer.timeout.connect(on_timer_timeout)
	pass

#音乐播放结束时开始计时器
func on_finishen() -> void:
	$Timer.wait_time = randi_range(15,20)
	$Timer.start()
	pass

#计时器结束后开始播放音乐
func on_timer_timeout() -> void:
	self.play()
	pass
